package com.cash.loan.modular.cash.service;

import com.cash.loan.modular.cash.result.PageResult;
import com.cash.loan.modular.cash.result.ServerResponse;
import com.cash.loan.modular.cash.transfer.CreateStrategyDto;
import com.cash.loan.modular.cash.transfer.LoanStrategyListVo;
import com.cash.loan.modular.cash.transfer.UpdateStrategyDto;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 * @Date 2018-07-20 9:03
 */
public interface StrategyService {

    /**
     * 得到策略文章列表
     * @param keyword
     * @param sDate
     * @param eDate
     * @param currentPage
     * @param pageSize
     * @return
     */
    PageResult<LoanStrategyListVo> getLoanStrategyList(String keyword, Date sDate,
                                                       Date eDate, Integer currentPage, Integer pageSize);

    /**
     * 存储策略
     * @param strategyDto
     * @return
     */
    Boolean createStrategy(CreateStrategyDto strategyDto);

    /**
     * 更新策略
     * @param strategyDto
     * @return
     */
    Boolean updateStrategy(UpdateStrategyDto strategyDto);

    /**
     * 获取策略文章信息
     * @param id
     * @return
     */
    Map<String,Object> getStrategyContentById(Long id);

    /**
     * 通过主键删除文章
     * @param id
     * @return
     */
    Boolean deleteById(Long id);

    /**
     * 更新旧数据
     * @return
     */
    ServerResponse updateOldData();

    /**
     * 文章类型列表
     * @return
     */
    List<Map<String,Object>> getCateList();
}
